package com.crhms.seabow.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.crhms.seabow.entity.UserRole;
import com.crhms.seabow.repository.UserRoleRepository;
import com.sun.org.apache.xpath.internal.objects.XString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserRoleService {

    @Autowired
    private UserRoleRepository userRoleRepository;

    public List<UserRole> getUserRoles(String userId) {

        List<UserRole> userRoles = userRoleRepository.selectList(new QueryWrapper<UserRole>()
                .eq("userId", userId));

        return userRoles;
    }

}
